import request from "@/utils/request";

// 鞋架列表
export function getShoeRackList(params, page = 1, pageSize = 10) {
  return request({
    url: `/shoeRack/list?pageNo=${page}&pageSize=${pageSize}`,
    method: "post",
    data: params,
  });
}

// 用户的鞋架
export function getShoeRackListUser(params, page = 1, pageSize = 10) {
  return request({
    url: `/shoeRack/userShoeRackList?pageNo=${page}&pageSize=${pageSize}`,
    method: "post",
    data: params,
  });
}


// 获取鞋架详情
export function getShoeRackDetail(id) {
  return request({
    url: `/shoeRack/getDetailById?theId=${id}`,
    method: "post",
  });
}

// 新增或者编辑鞋架
export function addOrEditShoeRack(data) {
  return request({
    url: "/shoeRack/saveUpdate",
    method: "post",
    data,
  });
}

// 删除鞋架
export function deleteShoeRack(id) {
  return request({
    url: `/shoeRack/deleteByStatus?theId=${id}`,
    method: "post",
  });
}

// 鞋架格子列表
export function getShoeRackGridList(params, page = 1, pageSize = 10) {
  return request({
    url: `/shoeRackGrid/list?pageNo=${page}&pageSize=${pageSize}`,
    method: "post",
    data: params,
  });
}

// 获取鞋子列表
export function getShoeList(params, page = 1, pageSize = 10) {
  return request({
    url: `/shoe/list?pageNo=${page}&pageSize=${pageSize}`,
    method: "post",
    data: params,
  });
}

// 通过水洗码获取鞋子详情
export function getShoeDetailByWashCode(washCode) {
  return request({
    url: `/shoe/shoeDetailByWashCode?washCode=${washCode}`,
  });
}

// 修改鞋子状态为清洗完成
export function updateShoeStatusToWashComplete(ids) {
  return request({
    url: `/shoe/shoeClearFinish?ids=${ids}`,
  });
}

// 鞋子返洗
export function shoeBackWash(id) {
  return request({
    url: `/shoe/returnWash?id=${id}`,
  });
}
